function assert(b: any, msg?: string): void {
	egret.assert(b, msg);
}


// 不像promisefy,没有error返回！
function promiseCallback(func: Function): Function {
	return (...arg): Promise<void> =>
		new Promise((resolve, reject) => {
			func(...arg, (rt) => resolve(rt));
		});
}

// callback作为第一个参数！
function promiseCallback0(func: Function): Function {
	return (...arg): Promise<void> =>
		new Promise((resolve, reject) => {
			func((rt) => resolve(rt), ...arg);
		});
}
